/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.edu.pucp.dp1.gui.vista;

import javax.swing.JPanel;
import javax.swing.JScrollPane;

/**
 *
 * @author Edgard
 */
public class ThreadMap extends Thread {

    Mapa mapa;
    JScrollPane jScrollPane1;

    public ThreadMap(Mapa mapa, JScrollPane jScrollPane1) {
        this.mapa = mapa;
        this.jScrollPane1 = jScrollPane1;
    }

    public void run() {

        while (true) {
            try {
                jScrollPane1.setViewportView(mapa);
                
                Thread.sleep(1000);

            } catch (Exception e) {
            }
        }
    }
}
